//
//  RootViewController.m
//  testFullScreen
//
//  Created by Juvid on 2017/6/15.
//  Copyright © 2017年 Juvid. All rights reserved.
//

#import "RootViewController.h"

@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor=[UIColor whiteColor];
    // Do any additional setup after loading the view.
}
-(BOOL)shouldAutorotate{
    return [self.topViewController shouldAutorotate];
}
///< 只能写topViewController或者viewControllers.lastObject，visibleViewController会导致返回与设置不一样
-(UIInterfaceOrientationMask)supportedInterfaceOrientations{
    NSLog(@"可用的：%@ 最顶层的：%@ 最后一个：%@",self.topViewController,self.visibleViewController,self.viewControllers.lastObject);
    return [self.topViewController supportedInterfaceOrientations];
}
-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
    return UIInterfaceOrientationPortrait;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
